<?
	$tpl->assign("action", "assessment-add.php");
	$tpl->assign("id", $id);

	$sql = "SELECT MAX(sub) FROM assessment WHERE year = ".$_SESSION['year']." and gid = ".$_GET['id'];
	$max = $db->queryUniqueValue($sql);
	for($i = 1; $i <= $max + 1; $i++){
		$sub[] = $i;
		$last = $i;
	}

	$tpl->assign("last", $last);
	$tpl->assign("sub", $sub);

	$tpl->draw("assessment-form");
?>